package com.union.vehicleassistant.util.refresh;


import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.loadmore.BaseLoadMoreView;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.union.vehicleassistant.R;

import java.util.Objects;

public final class BRVHLoadMoreView extends BaseLoadMoreView {

    @NonNull
    @Override
    public View getLoadComplete(@NonNull BaseViewHolder baseViewHolder) {
        return Objects.requireNonNull(baseViewHolder.findView(R.id.load_more_load_complete_view));
    }

    @NonNull
    @Override
    public View getLoadEndView(@NonNull BaseViewHolder baseViewHolder) {
        return Objects.requireNonNull(baseViewHolder.findView(R.id.load_more_load_end_view));
    }

    @NonNull
    @Override
    public View getLoadFailView(@NonNull BaseViewHolder baseViewHolder) {
        return Objects.requireNonNull(baseViewHolder.findView(R.id.load_more_load_fail_view));
    }

    @NonNull
    @Override
    public View getLoadingView(@NonNull BaseViewHolder baseViewHolder) {
        return Objects.requireNonNull(baseViewHolder.findView(R.id.load_more_loading_view));
    }

    @NonNull
    @Override
    public View getRootView(@NonNull ViewGroup viewGroup) {
        return LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.layout_brvah_load_more, viewGroup, false);
    }
}